<template>
  <div class="v-input-container">
    <input type="text" :value="value" @input="handleInputChange" />

    <input type="checkbox" :checked="checked" @change="onChange" />
  </div>
</template>
<script>
export default {
  model: [
    {
      prop: "checked", // 属性名字
      event: "myChange",
    },
  ],
  props: {
    // value: String,
    checked: Boolean,
  },
  data() {
    return {};
  },
  methods: {
    onChange(e) {
      console.log(e.target.checked);
      this.$emit("change", e.target.checked);
    },
    handleInputChange(e) {
      console.log("e", e.target.value);
      this.$emit("input", e.target.value);
    },
  },
};
</script>
